package ch.pizzapp.kurier.data;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class GenarateItemData implements Parcelable {

	@JsonProperty("status")
	String status;
	@JsonProperty("title")
	String title;
	@JsonProperty("productID")
	String productID;
	@JsonProperty("icon")
	String icon;

	@JsonProperty("sizes")
	List<Size> sizes;

	@JsonProperty("items")
	List<GenarateItem> items;

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getProductID() {
		return this.productID;
	}

	public void setProductID(String productID) {
		this.productID = productID;
	}

	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public List<Size> getSizes() {
		return this.sizes;
	}

	public void setSizes(List<Size> sizes) {
		this.sizes = sizes;
	}

	public List<GenarateItem> getItems() {
		return this.items;
	}

	public void setItems(List<GenarateItem> items) {
		this.items = items;
	}

	protected GenarateItemData(Parcel in) {
		status = in.readString();
		title = in.readString();
		productID = in.readString();
		icon = in.readString();
		sizes = new ArrayList<Size>();
		in.readList(sizes, Size.class.getClassLoader());
		items = new ArrayList<GenarateItem>();
		in.readList(items, GenarateItem.class.getClassLoader());
	}

	public GenarateItemData() {
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(status);
		dest.writeString(title);
		dest.writeString(productID);
		dest.writeString(icon);
		dest.writeList(sizes);
		dest.writeList(items);
	}

	public static final Parcelable.Creator<GenarateItemData> CREATOR = new Parcelable.Creator<GenarateItemData>() {
		public GenarateItemData createFromParcel(Parcel in) {
			return new GenarateItemData(in);
		}

		public GenarateItemData[] newArray(int size) {
			return new GenarateItemData[size];
		}
	};
}